import request from '@/utils/request'

// 封装获取分类的请求
export const getCategoryAPI = () => {
  return request.get('/my/cate/list')
}

// 封装添加分类的请求
export const addCategoryAPI = data => {
  return request.post('/my/cate/add', data)
}

// 封装删除分类的请求
export const delCategoryAPI = id => {
  return request.delete('/my/cate/del', { params: { id } })
}

// 封装修改分类的方法
export const updateCategoryAPI = data => {
  return request.put('/my/cate/info', data)
}
